package cn.edu.xmu.restfuldemo.model.BO;

import cn.edu.xmu.restfuldemo.model.PO.GoodsSkuPo;
import lombok.*;

import java.time.LocalDateTime;

/**
 * @author Team3-5
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class GoodsSku {
    private Long id;
    private Long goodsSpuId;
    private String skuSn;
    private String name;
    private Long originalPrice;
    private String configuration;
    private Long weight;
    private String imageUrl;
    private Integer inventory;
    private String detail;
    private Byte disabled;
    private LocalDateTime gmtCreate;
    private LocalDateTime gmtModified;
    private Byte state;

    /**
     * gooksSku->goodsSkuPo
     * @return
     */
    public GoodsSkuPo newGoodsSkuPo(){
        GoodsSkuPo goodsSkuPo = new GoodsSkuPo();
        goodsSkuPo.setId(this.id);
        goodsSkuPo.setGoodsSpuId(this.goodsSpuId);
        goodsSkuPo.setSkuSn(this.skuSn);
        goodsSkuPo.setName(this.name);
        goodsSkuPo.setOriginalPrice(this.originalPrice);
        goodsSkuPo.setConfiguration(this.configuration);
        goodsSkuPo.setWeight(this.weight);
        goodsSkuPo.setImageUrl(this.imageUrl);
        goodsSkuPo.setInventory(this.inventory);
        goodsSkuPo.setDetail(this.detail);
        goodsSkuPo.setDisabled(this.disabled);
        goodsSkuPo.setGmtCreate(this.gmtCreate);
        goodsSkuPo.setGmtModified(this.gmtModified);
        goodsSkuPo.setState(this.state);
        return goodsSkuPo;
    }
}
